package com.weather.androidweather.util;

import com.weather.androidweather.R;

public class WeatherIconUtil {
    public static int getBackgroundByWeather(String weather) {
        if (weather == null) return R.drawable.bg_clear;
        
        if (weather.contains("晴")) {
            return R.drawable.bg_clear;
        } else if (weather.contains("多云")) {
            return R.drawable.bg_cloudy;
        } else if (weather.contains("雨")) {
            return R.drawable.bg_rain;
        } else if (weather.contains("雪")) {
            return R.drawable.bg_snow;
        } else {
            return R.drawable.bg_clear;
        }
    }

    public static int getWeatherIcon(String weather) {
        if (weather == null) return R.drawable.ic_clear;
        
        if (weather.contains("晴")) {
            return R.drawable.ic_clear;
        } else if (weather.contains("多云")) {
            return R.drawable.ic_cloudy;
        } else if (weather.contains("雨")) {
            return R.drawable.ic_rain;
        } else if (weather.contains("雪")) {
            return R.drawable.ic_snow;
        } else {
            return R.drawable.ic_clear;
        }
    }
} 